package com.nts.visionworks.business.endpoint.domain;

// Generated 2013. 6. 23 ���� 6:33:40 by Hibernate Tools 4.0.0

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.validation.constraints.Min;

import com.nts.visionworks.core.validation.EntityIdNotNull;

/**
 * EndPointDisplay generated by hbm2java
 */
@Entity
@Table(name = "end_point_display", catalog = "visionworks")
public class EndPointDisplay implements java.io.Serializable
{

	private Long displayId;
	private EndPoint endPoint;
	private int leftCoordinate;
	private int topCoordinate;
	private int width;
	private int height;

	public EndPointDisplay()
	{
	}

	public EndPointDisplay(EndPoint endPoint, int leftCoordinate,
			int topCoordinate, int width, int height)
	{
		this.endPoint = endPoint;
		this.leftCoordinate = leftCoordinate;
		this.topCoordinate = topCoordinate;
		this.width = width;
		this.height = height;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "DisplayId", unique = true, nullable = false)
	public Long getDisplayId()
	{
		return this.displayId;
	}

	public void setDisplayId(Long displayId)
	{
		this.displayId = displayId;
	}

	@EntityIdNotNull(message = "validation.endPointDisplay.endPoint.notNull")
	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "EndPointId", nullable = false)
	public EndPoint getEndPoint()
	{
		return this.endPoint;
	}

	public void setEndPoint(EndPoint endPoint)
	{
		this.endPoint = endPoint;
	}

	@Column(name = "LeftCoordinate", nullable = false)
	public int getLeftCoordinate()
	{
		return this.leftCoordinate;
	}

	public void setLeftCoordinate(int leftCoordinate)
	{
		this.leftCoordinate = leftCoordinate;
	}

	@Column(name = "TopCoordinate", nullable = false)
	public int getTopCoordinate()
	{
		return this.topCoordinate;
	}

	public void setTopCoordinate(int topCoordinate)
	{
		this.topCoordinate = topCoordinate;
	}

	@Min(message = "validation.endPointDisplay.width.min", value = 1)
	@Column(name = "Width", nullable = false)
	public int getWidth()
	{
		return this.width;
	}

	public void setWidth(int width)
	{
		this.width = width;
	}

	@Min(message = "validation.endPointDisplay.height.min", value = 1)
	@Column(name = "Height", nullable = false)
	public int getHeight()
	{
		return this.height;
	}

	public void setHeight(int height)
	{
		this.height = height;
	}

}
